import axios from '@/utils/request'

import config from '@/common/config'

let base = config.getMkBasePath();


/**
 * mem_member_grade
 *1    默认只开放普通查询，所有查询，只要上传	 分页参数 {currentPage:当前页码从1开始,pageSize:每页记录数,total:总记录【数如果是0后台会自动计算总记录数非0不会自动计算】}，后台都会自动按分页查询 其它 api用到再打开，没用到的api请注释掉，
 *2 查询、新增、修改的参数格式  params={id:'主键 主键',userid:'用户编号',gradeId:'等级编号',state:'状态0无效1有效2已变更为新等级后无效',lastUpdateTime:'最后更新时间',startTime:'开始时间',endTime:'结束时间',addTime:'添加时间',remark:'备注'}
 **/
 
//普通查询 条件之间and关系  
export const listMemMemberGrade = params => { return axios.get(`${base}/mk/mem/memberGrade/list`, { params: params }); };

//模糊查询mem_member_grade 条件之间or关系  
//export const listMemMemberGradeKey = params => { return axios.get(`${base}/mk/mem/memberGrade/listKey`, { params: params }); };

//删除一条mem_member_grade params={id:'主键 主键'}
export const delMemMemberGrade = params => { return axios.post(`${base}/mk/mem/memberGrade/del`,params); };

//批量删除mem_member_grade  params=[{id:'主键 主键'}]
export const batchDelMemMemberGrade = params => { return axios.post(`${base}/mk/mem/memberGrade/batchDel`, params); };

//修改一条mem_member_grade记录
export const editMemMemberGrade = params => { return axios.post(`${base}/mk/mem/memberGrade/edit`, params); };

//新增一条mem_member_grade
export const addMemMemberGrade = params => { return axios.post(`${base}/mk/mem/memberGrade/add`, params); };

//新增一条mem_member_grade自动
export const addMemMemberGradeAuto = params => { return axios.post(`${base}/mk/mem/memberGrade/addAuto`, params); };